package com.glsc.ngateway.flowable.service;

import com.glsc.ngateway.common.api.flowable.dto.demand.FlowableAssigneeDto;
import com.glsc.ngateway.common.base.converter.flowable.FlowableAssigneeConverter;
import com.glsc.ngateway.common.base.repo.mysql.flowable.FlowableAssigneeRepo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FlowableAssigneeService {

    private static final Logger logger = LoggerFactory.getLogger(FlowableAssigneeService.class);

    @Autowired
    FlowableAssigneeRepo flowableAssigneeRepo;


    public List<FlowableAssigneeDto> findAssigneeByKey(String processDefinitionKey, String sysid) {
        return FlowableAssigneeConverter.domain2Dto(flowableAssigneeRepo.findByProcessDefinitionKey(processDefinitionKey, sysid));
    }

}